<template>
	<el-config-provider :locale="setLanguage" :size="moduleSize" :message="{ max: messageMax }" :button="{ autoInsertSpace }">
		<router-view> </router-view>
	</el-config-provider>
</template>
<script setup lang="ts">
import themeStore from '@/stores/theme';
import zh from 'element-plus/dist/locale/zh-cn.mjs';
import en from 'element-plus/dist/locale/en.mjs';
const theme = themeStore();
const { moduleSize, messageMax, autoInsertSpace } = storeToRefs(theme);
const setLanguage = computed(() => {
	return theme.language == 'zh' ? zh : en;
});
</script>

<style scoped></style>
